function check()   
  {   
  	  var r = true;
	  var title = document.getElementById("title"); 
	  var isbn = document.getElementById("isbn"); 
	  var description = document.getElementById("description"); 
	  var itemPrice = document.getElementById("itemPrice"); 	 
	  var shippingPrice = document.getElementById("shippingPrice"); 
	  var isbn = $("#isbn").val();
	  if(Number(shippingPrice.value)>=Number('4')){
		  alert("the shipping price should be less than 4 dollars");
		  r=false;
	  }
	  if(title.value==""||isbn.value==""||description.value==""||itemPrice.value==""||shippingPrice.value==""||itemPrice.value==""){
		  alert( "you need to fill all the fields"); 
          r=false;
	  }

	

		 if(r==true){
			  self.location="/seller/addItem?title="+document.getElementById("title").value+"&isbn="+document.getElementById("isbn").value+"&description="+document.getElementById("description").value+"&itemPrice="+document.getElementById("itemPrice").value +"&shippingPrice="+document.getElementById("shippingPrice").value+"&duration="+document.getElementById("duration").value;
		  }
  }

